export type FilePath = string;

export enum UploadStatus {
  SUCCESS,
  FAILURE,
}

export type Result = {
  code: UploadStatus;
  message: string;
};

export abstract class UploadFile {
  /**
   * 上传文件
   */
  public abstract uploadFile(
    file: Express.Multer.File,
  ): FilePath | Promise<FilePath>;

  /**
   * 删除文件
   */
  public abstract deleteFile(filePath: string): Result | Promise<Result>;
}
